Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hotfix] Finviz company_details DOM fix #204

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

taralika
Copy link

Hotfix on top of #202 to fix parsing the company_details due to an additional class text-xl

To fix parsing the `company_details` due to an additional class `text-xl`
try:
company_details = title.cssselect('h2[class="quote-header_ticker-wrapper_company text-xl"]')[0]
except IndexError:
company_details = title.cssselect('h2[class="quote-header_ticker-wrapper_company"]')[0]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this try except is because there are still some tickers that don't have the text-xl class on them e.g., https://finviz.com/quote.ashx?t=SQM

@planetwerth
Copy link

for noobs reading this

pip uninstall finviz 
pip install git+https://github.com/taralika/finviz.git 

to get it working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants